{% import 'macro.html.twig' as web_macro %}
<table class="table table-striped table-hover" id="quiz-table">
  <thead>
  <tr>
    <th><input type="checkbox" autocomplete="off" class="js-select-all"></th>
    <th width="60%">{{'course.question_manage.stem'|trans}}</th>
    <th width="15%">{{'course.question_manage.type'|trans}}</th>
    <th width="15%">{{'course.question_manage.manage.difficulty'|trans}}</th>
  </tr>
  </thead>
  <tbody>
  {% for item in items %}
    <tr data-role="item">
      <td><input value="{{item.id}}" data-id="{{item.id}}" data-type="{{ item.type }}" type="checkbox" autocomplete="off" class="js-checkbox"></td>
      <td>
        <a class="color-info" data-toggle="tooltip" data-placement="top" title="" data-original-title="{{ question_html_filter(item.material |fill_question_stem_text) }}">
          {% if item.includeImg|default(null) %}<span class="glyphicon glyphicon-picture"></span>{% endif %}
          {{ item.material |fill_question_stem_text| plain_text(30) }}
        </a>
        <br/>
        <span class="color-gray text-sm">{{ 'category'|trans }}：
          {% if item.category_id %}
            {{ itemCategories[item.category_id].name }}
          {% else %}
            {{ 'site.data.empty'|trans }}
          {% endif %}
        </span>
      </td>
      <td>
        {{ dict_text('questionType', item.type) }}
        {% if item.type == 'material'%}
          <br><small class="color-gray">({{ item.question_num }}{{'course.question_manage.question.sub_question'|trans}})</small>
        {% endif %}
      </td>
      <td>{{ dict_text('difficulty', item.difficulty) }}</td>
    </tr>
  {% else %}
    <tr>
      <td colspan="20"><div class="empty">{{'question.marker_search.empty_tips'|trans}}</div></td>
    </tr>
  {% endfor %}
  </tbody>
</table>
<nav class="text-center">
  {{ web_macro.ajax_paginator(paginator) }}
</nav>